package org.lee.bean.domain

import grails.persistence.Entity
import groovy.transform.ToString

@Entity
class Person1 {
	
	static mapping = {
		table 'person1'
		version false
		
//		age type: 'byte'
		lastUpdated column: 'update_date'
		dateCreated column: 'create_date'//, defaultValue: null
		
//		dateCreated nullable: true
//		autoTimestamp: true
		
		datasource 'dataSource1'
	}

	int id
	String name
	byte age
	Date lastUpdated
	Date dateCreated
	
	@Override
	public String toString() {
		return "--- id=$id, name=$name, age=$age, updateDate=$lastUpdated, createDate=$dateCreated"
	}
}
